package class1;

 class XY {
    private static int counter=0;
    private int id;
    private int x;
    private int y;
    {
        id=++counter;
    }
    public XY(){}
    public XY(int x){this.x=x;}
    public XY(int x,int y){this.y=y;this.x=x;}

    public String toString(){
        return "No."+id+"....("+x+","+y+")";
    }
}
 class XYTester{
public static void main(String[]args){
    XY a=new XY();
    XY b=new XY(10);
    XY c=new XY(10,20);
    System.out.println(a);
    System.out.println(b);
    System.out.println(c);
        }
}